public class ArrayDemo1 {
    public static void main(String[] args){
        // 声明并初始化存储书名的数组
        String[] bookTitles = {"Java编程基础","数据结构与算法","Python入门","数据库原理","计算机网络"};
        // 输入数组长度（图书总数）
        System.out.println("图书馆共有" + bookTitles.length + "本图书");
        //遍历数组输出所有书名
        for (int i = 0;i < bookTitles.length; i++){
            System.out.println("第" + (i+1) + "本" + bookTitles[i]);
        }
    }
}
